
package com.adakoda.android.animation.sample;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class AnimLib4CustomPropSampleActivity extends ListActivity {
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setListAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, ACTIVITIES));

        final ListView listView = getListView();
        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                String activity = ACTIVITIES[position];
                Intent intent = new Intent();
                String packageName = "com.example.android.apis.animation";
                String className = packageName + "." + activity;
                intent.setClassName(AnimLib4CustomPropSampleActivity.this, className);
                startActivity(intent);
            }
        });
    }

    private static final String[] ACTIVITIES = new String[] {
            "AnimationCloning", "AnimationSeeking", "BouncingBalls",
            "CustomEvaluator", "MultiPropertyAnimation", "ReversingAnimation"
    };

}
